/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package CONTROLES;

import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Checkbox;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.List;
import javax.swing.JCheckBox;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JTextField;


/**
 *
 * @author Administrador
 */
public class FlowLayout2 {


    public static void main(String args[])
    {
        Frame f = new Frame("Ejemplo flowlayout");

        f.setPreferredSize(new Dimension(600, 100));
        f.setLayout( new GridLayout(4,2,3,3));
        f.add(new Button("red"));
        f.add(new Button("blue"));
        f.add(new Button("black"));

        List lista  = new List();
        for(int i=0; i<args.length; i++){
            lista.add(args[i]);
        }

        f.add(lista);
        f.add(new JCheckBox("hey", true));
        f.add(new JLabel("tu"));
        f.add(new JTextField(20));

        f.pack();

        f.setVisible(true);

    }

}
